package com.example.blueconn

import com.example.blueconn.utils.DataUtils
import org.junit.Assert.*
import org.junit.Test

/**
 * Example local unit test, which will execute on the development machine (host).
 *
 * See [testing documentation](http://d.android.com/tools/testing).
 */
class ExampleUnitTest {
    @Test
    fun addition_isCorrect() {
        var a = "aabbewed20ghfhxccddff"
        var b = a.split("20")
        var index = b[1].indexOf("ff")
        println(index)
        println(b[0])
        println(b[1].substring(0, index))
    }

    @Test
    fun textSlipt() {
        val str = "DD41302E303039393931202D3235362E39FFFFFF"
        println(DataUtils.bytesToHex(str.toByteArray()))
        val bytes = DataUtils.hexToBytes(str)
        println(bytes)
        println(DataUtils.bytesToHex(bytes))
    }

    @Test
    fun testConvert() {

    }
}